function log(target, name, descriptor) {
  console.log(target, name, descriptor);
}

// es7 decorate模式(装饰器模式)
@log
class car {
  run() {
    console.log('Car is runing');
  }
}